package com.assignwork.service.impl;

import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springblade.core.mp.base.BaseServiceImpl;
import com.assignwork.entity.AssignWorkInfo;
import com.assignwork.mapper.AssignWorkInfoMapper;
import com.assignwork.service.IAssignWorkInfoService;

/**
 * 二级配工详情(AssignWorkInfo)表服务实现类
 */
@AllArgsConstructor 
@Service("assignWorkInfoService")
public class AssignWorkInfoServiceImpl extends BaseServiceImpl<AssignWorkInfoMapper, AssignWorkInfo> implements IAssignWorkInfoService {

    @Override
    public boolean disableByAssignId(Long assignWorkId) {
        return this.lambdaUpdate()
                .set(AssignWorkInfo::getStatus, 0)
                .eq(AssignWorkInfo::getAssignWorkId, assignWorkId)
                .update();
    }
}
